<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
                             "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<ui:composition xmlns="http://www.w3.org/1999/xhtml"
                xmlns:s="http://jboss.com/products/seam/taglib"
                xmlns:ui="http://java.sun.com/jsf/facelets"
                xmlns:f="http://java.sun.com/jsf/core"
                xmlns:h="http://java.sun.com/jsf/html"
                xmlns:rich="http://richfaces.org/rich"
                template="layout/template.xhtml">
                       
<ui:define name="body">
    
    <h:messages globalOnly="true" styleClass="message" id="globalMessages"/>
    
    <rich:panel>
        <f:facet name="header">HistoricoItem</f:facet>

        <s:decorate id="indHistorico" template="layout/display.xhtml">
            <ui:define name="label">indHistorico</ui:define>
            #{historicoItemHome.instance.id.indHistorico}
        </s:decorate>

        <s:decorate id="indGradeCurricular" template="layout/display.xhtml">
            <ui:define name="label">indGradeCurricular</ui:define>
            #{historicoItemHome.instance.id.indGradeCurricular}
        </s:decorate>

        <s:decorate id="indDisciplina" template="layout/display.xhtml">
            <ui:define name="label">indDisciplina</ui:define>
            #{historicoItemHome.instance.id.indDisciplina}
        </s:decorate>

        <s:decorate id="numNota" template="layout/display.xhtml">
            <ui:define name="label">numNota</ui:define>
            #{historicoItemHome.instance.numNota}
        </s:decorate>

        <s:decorate id="numFalta" template="layout/display.xhtml">
            <ui:define name="label">numFalta</ui:define>
            #{historicoItemHome.instance.numFalta}
        </s:decorate>

        <div style="clear:both"/>
        
    </rich:panel>
    
    <div class="actionButtons">      

        <s:button view="/HistoricoItemEdit.xhtml" 
                    id="edit" 
                 value="Edit"/>

        <s:button view="/#{empty historicoItemFrom ? 'HistoricoItemList' : historicoItemFrom}.xhtml"
                    id="done"
                 value="Done"/>

    </div>

    <rich:tabPanel switchType="ajax">

    <rich:tab label="historico">
    <div class="association" id="historicoParent">
        
        <h:outputText value="No historico" 
                   rendered="#{historicoItemHome.instance.historico == null}"/>
        
        <rich:dataTable var="historico" 
                   value="#{historicoItemHome.instance.historico}" 
                rendered="#{historicoItemHome.instance.historico != null}"
              rowClasses="rvgRowOne,rvgRowTwo"
                      id="historicoTable">
            <h:column>
                <f:facet name="header">idtHistorico</f:facet>
                #{historico.idtHistorico}
            </h:column>
            <h:column>
	    	    <f:facet name="header">curso idtCurso</f:facet>
		    	#{historico.curso.idtCurso}
            </h:column>
            <h:column>
	    	    <f:facet name="header">aluno idtAluno</f:facet>
		    	#{historico.aluno.idtAluno}
            </h:column>
            <h:column>
                <f:facet name="header">action</f:facet>
                <s:link id="viewhistorico" 
                     value="View" 
                      view="/Historico.xhtml">
                    <f:param name="historicoIdtHistorico" 
                           value="#{historico.idtHistorico}"/>
                </s:link>
            </h:column>
        </rich:dataTable>
        
    </div>
    </rich:tab>

    <rich:tab label="disciplina">
    <div class="association" id="disciplinaParent">
        
        <h:outputText value="No disciplina" 
                   rendered="#{historicoItemHome.instance.disciplina == null}"/>
        
        <rich:dataTable var="disciplina" 
                   value="#{historicoItemHome.instance.disciplina}" 
                rendered="#{historicoItemHome.instance.disciplina != null}"
              rowClasses="rvgRowOne,rvgRowTwo"
                      id="disciplinaTable">
            <h:column>
                <f:facet name="header">idtDisciplina</f:facet>
                #{disciplina.idtDisciplina}
            </h:column>
            <h:column>
                <f:facet name="header">codDisciplina</f:facet>
                #{disciplina.codDisciplina}
            </h:column>
            <h:column>
                <f:facet name="header">nomDisciplina</f:facet>
                #{disciplina.nomDisciplina}
            </h:column>
            <h:column>
                <f:facet name="header">desDisciplina</f:facet>
                #{disciplina.desDisciplina}
            </h:column>
            <h:column>
                <f:facet name="header">action</f:facet>
                <s:link id="viewdisciplina" 
                     value="View" 
                      view="/Disciplina.xhtml">
                    <f:param name="disciplinaIdtDisciplina" 
                           value="#{disciplina.idtDisciplina}"/>
                </s:link>
            </h:column>
        </rich:dataTable>
        
    </div>
    </rich:tab>
</rich:tabPanel>
</ui:define>

</ui:composition>
